﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyWeb.ServiceBus.Model.Dto
{
    public class RequestLogInfo
    {
        /// <summary>
        /// 服务方应用Id
        /// </summary>
        public long ApplicationId { get; set; }
        /// <summary>
        /// 服务Id
        /// </summary>
        public long SysServiceId { get; set; }
        /// <summary>
        /// 服务网关Id
        /// </summary>
        public long GatewayId { get; set; }
        /// <summary>
        /// 调用方应用Id
        /// </summary>
        public long CallerAppId { get; set; }
        /// <summary>
        /// 请求头
        /// </summary>
        public string Headers { get; set; } = string.Empty;
        /// <summary>
        /// 响应头
        /// </summary>
        public string Response { get; set; } = string.Empty;
        /// <summary>
        /// 实际请求地址
        /// </summary>
        public string UrlReferrer { get; set; } = string.Empty;
        /// <summary>
        /// 请求报文
        /// </summary>
        public string RequestParam { get; set; } = string.Empty;
        /// <summary>
        /// 响应报文
        /// </summary>
        public string ResultParam { get; set; } = string.Empty;
        /// <summary>
        /// 请求报文长度
        /// </summary>
        public long RequestLen { get; set; }
        /// <summary>
        /// 响应报文长度
        /// </summary>
        public long ResultLen { get; set; }
        /// <summary>
        /// 前端请求时间
        /// </summary>
        public DateTime ForeStartTime { get; set; }
        /// <summary>
        /// 前端响应时间
        /// </summary>
        public DateTime ForeEndTime { get; set; }
        /// <summary>
        /// 后端请求时间
        /// </summary>
        public DateTime RearStartTime { get; set; }
        /// <summary>
        /// 后端响应时间
        /// </summary>
        public DateTime RearEndTime { get; set; }
        /// <summary>
        /// 服务版本
        /// </summary>
        public string Version { get; set; } = string.Empty;
        /// <summary>
        /// 服务编码
        /// </summary>
        public string ServiceCode { get; set; } = string.Empty;
        /// <summary>
        /// 调用方应用编码
        /// </summary>
        public string SerAppCode { get; set; } = string.Empty;
        /// <summary>
        /// 服务方应用编码
        /// </summary>
        public string CallerAppCode { get; set; } = string.Empty;
        /// <summary>
        /// 前端请求耗时
        /// </summary>
        public double EsbCostTime { get; set; }
        /// <summary>
        /// 后端请求耗时
        /// </summary>
        public double CostTime { get; set; }
    }
}
